package base.stream;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileInputAndFileOutputStream {

    public static void main(String[] args) throws IOException {
        output();
    }

    public static void output() throws IOException {
        // tt 是一个文件夹, 将抛出异常FileNotFoundException
        FileOutputStream fileOutputStream = new FileOutputStream(new File("C:\\Temp\\test\\tt"));
        fileOutputStream.write("hello".getBytes());
        fileOutputStream.flush();
        fileOutputStream.close();

    }
}
